package com.hidt.shop.controller;

import com.hidt.shop.domain.Order_item;
import com.hidt.shop.service.Order_itemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author Fhy
 * @Title Order_itemController
 * @Package com.hdit.shop.controller
 * @Description 订单详情的请求接口
 * @date 2021/1/21 20:06
 */
@RestController
public class Order_itemController {
    @Autowired
    private Order_itemService orderItemService;
    /**
     * 方法描述: 过订单id查找所有订单详情数据
     * @author Fhy
     * @Date 2021/1/21 20:10
     * @params [map]
     * @return java.util.List<com.hidt.shop.domain.Order_item>
     */
    @RequestMapping("/findOrderItemByOrderId")
    public List<Order_item> findOrderItemByOrderId(@RequestBody Map<String,String> map) {
        String order_id = map.get("order_id");
        List<Order_item> orderItemList = orderItemService.findOrderItemByOrderId(order_id);
        return orderItemList;
    }
}
